#include "junix.h"
#include <malloc.h>

int main(int argc, char **argv)
{
  void *i=calloc(1,sizeof(int));
  fprintf(stdout,"%d\n",*(int*)i);
  fprintf(stdout,"%p\n",i);

  free(i);
  int ii =1024*1024;
  if(0!=posix_memalign(&i,ii,sizeof(int)))
    err_quit("posix_memalign");

  fprintf(stdout,"%p\n",i);
  free(i);

  i=valloc(sizeof(int));
  fprintf(stdout,"%p\n",i);
  free(i);

  i=memalign(1024*1024,sizeof(int));
  fprintf(stdout,"%p\n",i);
  free(i);

  return 0;
}



